﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using E_Commerce.Domain.Entities;
using System.ComponentModel.DataAnnotations;//引用

namespace E_Commerce.Application.Dto
{
    //Dto是视图模型
   public class ProductDto
    {
        [Key]
        public int ProId { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        [StringLength(100)]
        public string ProName { get; set; }
        /// <summary>
        /// 原价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 现价格
        /// </summary>
        public decimal NewPrice { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        [StringLength(500)]
        public string PicUrl { get; set; }
        /// <summary>
        /// 生产地址
        /// </summary>
        [StringLength(200)]
        public string ProAdress { get; set; }
        /// <summary>
        /// 保质期
        /// </summary>
        public int SheifLife { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int ProNum { get; set; }
        /// <summary>
        /// 种类
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        public int Inventory { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 买过
        /// </summary>
        [StringLength(50)]
        public string Bought { get; set; }
        /// <summary>
        /// 商家
        /// </summary>
        [StringLength(50)]
        public string Business { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }
        /// <summary>
        /// 规格表ID
        /// </summary>
        public int SpeciId { get; set; }
        /// <summary>
        /// 商品属性
        /// </summary>
        public string[] SpeAttribute { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        public string CateName { get; set; }

    }
}
